/**
 * ProjectName:  mall-service
 * FileName:  DemandServiceImpl.java
 * PackageName:  com.blx.service.impl
 * Copyright (c) 2013, CYOU All Rights Reserved.
*/
package com.blx.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.blx.dao.DemandDao;
import com.blx.entity.Demand;
import com.blx.service.DemandService;
import com.blx.utils.pagination.Pagination;

/**
 * ClassName:  DemandImpl. <br/>
 * Description: DemandService接口实现 <br/>
 * @author wangwl
 * 2013-3-4 下午9:02:20 <br/>
 * @version 1.0
 */
@Service
public class DemandServiceImpl implements DemandService {

	private final Logger logger = LoggerFactory.getLogger(getClass());

	@Autowired
	private DemandDao demandDao;

	/**
	 * 保存Demand实体
	 */
	public void saveDemand(Demand demand) {
		demandDao.saveDemand(demand);
	}
	/**
	 * 更新Demand实体
	 */
	public void updateDemand(Demand demand) {
		demandDao.updateDemand(demand);
	}
	/**
	 * 根据id删除Demand
	 */
	public void deleteDemandById(Integer demandId) {
		demandDao.deleteDemandById(demandId);
	}
	/**
	 * 根据id获取Demand
	 */
	public Demand getDemand(Integer demandId) {
		return demandDao.getDemandById(demandId);
	}
	/**
	 * 分页查询Demand
	 */
	public Pagination<Demand> findPageDemandAll(int pageNumber, int pageSize) {
		return demandDao.findPageDemandAll(pageNumber, pageSize);
	}

}

